<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: MusicBank</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">MusicBank</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/music_bank_rb.html">
                music_bank.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000008">&lt;&lt;</a>&nbsp;&nbsp;
      <a href="#M000005">[]</a>&nbsp;&nbsp;
      <a href="#M000009">add_music_bank</a>&nbsp;&nbsp;
      <a href="#M000010">add_song</a>&nbsp;&nbsp;
      <a href="#M000014">change_tag</a>&nbsp;&nbsp;
      <a href="#M000025">copy</a>&nbsp;&nbsp;
      <a href="#M000023">delete</a>&nbsp;&nbsp;
      <a href="#M000024">destroy</a>&nbsp;&nbsp;
      <a href="#M000022">each</a>&nbsp;&nbsp;
      <a href="#M000011">find</a>&nbsp;&nbsp;
      <a href="#M000004">find</a>&nbsp;&nbsp;
      <a href="#M000017">get_song</a>&nbsp;&nbsp;
      <a href="#M000019">get_songs</a>&nbsp;&nbsp;
      <a href="#M000007">length</a>&nbsp;&nbsp;
      <a href="#M000029">method_missing</a>&nbsp;&nbsp;
      <a href="#M000026">move</a>&nbsp;&nbsp;
      <a href="#M000001">new</a>&nbsp;&nbsp;
      <a href="#M000002">play</a>&nbsp;&nbsp;
      <a href="#M000016">play</a>&nbsp;&nbsp;
      <a href="#M000028">playlist</a>&nbsp;&nbsp;
      <a href="#M000012">rename</a>&nbsp;&nbsp;
      <a href="#M000003">rename</a>&nbsp;&nbsp;
      <a href="#M000013">rename_song</a>&nbsp;&nbsp;
      <a href="#M000006">size</a>&nbsp;&nbsp;
      <a href="#M000018">song</a>&nbsp;&nbsp;
      <a href="#M000015">tag</a>&nbsp;&nbsp;
      <a href="#M000020">to_s</a>&nbsp;&nbsp;
      <a href="#M000021">to_xml</a>&nbsp;&nbsp;
      <a href="#M000027">zip</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="Playlists.html">Playlists</a></span>
      </div>
    </div>

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">EXTENSIONS</td>
          <td>=</td>
          <td class="context-item-value">[:mp3];</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
Supported extensions for the music files

</td>
        </tr>
        </table>
      </div>
    </div>

    <div id="aliases-list">
      <h3 class="section-bar">External Aliases</h3>

      <div class="name-list">
                        <table summary="aliases">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">method_missing</td>
          <td>-&gt;</td>
          <td class="context-item-value">method_missing2</td>
        </tr>
                        </table>
      </div>
    </div>


    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">finder_options</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">location</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">name</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">nosongs</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">rename_format</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">run_play</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">songs</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000004" class="method-detail">
        <a name="M000004"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000004.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000004.html');return false;">
          <span class="method-name">find</span><span class="method-args">(location, opts)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Quickly finds the songs and return a <a
href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object.
</p>
<table>
<tr><td valign="top"><b>location</b>:</td><td>String, the folder&#8216;s location to search for the files.

</td></tr>
<tr><td valign="top"><b>opts</b>:</td><td>The same options in a Hash as used in <a
href="MusicBank.html#M000004">find</a> method but searchs inside
<b>location</b>.

</td></tr>
</table>
        </div>
      </div>

      <div id="method-M000001" class="method-detail">
        <a name="M000001"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000001.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000001.html');return false;">
          <span class="method-name">new</span><span class="method-args">(location, files=nil, safe=false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <table>
<tr><td valign="top"><b>location</b>:</td><td>String, the location of the files, absolute path only, with &quot;/&quot;
instead of &quot;\&quot;.

</td></tr>
<tr><td valign="top"><b>files</b>:</td><td>Array with String data. If provided will search all the songs names in the
directory provided in <b>location</b>.

</td></tr>
</table>
        </div>
      </div>

      <div id="method-M000002" class="method-detail">
        <a name="M000002"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000002.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000002.html');return false;">
          <span class="method-name">play</span><span class="method-args">(location)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Play the songs at the <b>location</b> directory, create a file named
musicbank.m3u inside that directory.
</p>
        </div>
      </div>

      <div id="method-M000003" class="method-detail">
        <a name="M000003"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000003.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000003.html');return false;">
          <span class="method-name">rename</span><span class="method-args">(location, format)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Rename the songs at <b>location</b> and return a <a
href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object.
</p>
<table>
<tr><td valign="top"><b>location</b>:</td><td>String, the folder&#8216;s location to <a
href="MusicBank.html#M000003">rename</a> the files.

</td></tr>
<tr><td valign="top"><b>format</b>:</td><td>String with the format to <a href="MusicBank.html#M000003">rename</a>
songs, see <a href="MusicBank.html#M000003">rename</a> instance method.

</td></tr>
</table>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000008.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000008.html');return false;">
          <span class="method-name">&lt;&lt;</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Adds an String, <a href="Mp3Info.html">Mp3Info</a> or <a
href="MusicBank.html">MusicBank</a> to the object.
</p>
        </div>
      </div>

      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000005.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000005.html');return false;">
          <span class="method-name">[]</span><span class="method-args">(*args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a <a href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object, can contain some different
calls
</p>
<pre>
  bank[4]             #=&gt; New object with the song at index number 4
  bank[2..4]          #=&gt; New object with the songs between index number 2 and 4
  bank[4, 5]          #=&gt; New object with the songs at index number 4 and 5 (not like an array)
  bank[0, 2, 14, 18]  #=&gt; Same as above, but songs are at indexes 0, 2, 14 and 18
</pre>
        </div>
      </div>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000009.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000009.html');return false;">
          <span class="method-name">add_music_bank</span><span class="method-args">(bank)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add <b>bank</b> to the bank as a <a href="MusicBank.html">MusicBank</a>
object.
</p>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000010.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000010.html');return false;">
          <span class="method-name">add_song</span><span class="method-args">(song)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add <b><a href="MusicBank.html#M000018">song</a></b> to the bank as String.
</p>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000014.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000014.html');return false;">
          <span class="method-name">change_tag</span><span class="method-args">(tag, value)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Change the <b><a href="MusicBank.html#M000015">tag</a></b> (Symbol or
String) of all files with the <b>value</b> (String) content.
</p>
        </div>
      </div>

      <div id="method-M000025" class="method-detail">
        <a name="M000025"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000025.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000025.html');return false;">
          <span class="method-name">copy</span><span class="method-args">(dir)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Copy the current songs into the <a href="MusicBank.html#M000001">new</a>
directory <b>dir</b>. Create if doesn&#8216;t exist, but if exist just add
the files. Then return a <a href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object containing the files that have
been moved and the <a href="MusicBank.html#M000001">new</a> location. Note
that if the target directory have more songs inside, the object will
contain just the moved ones.
</p>
        </div>
      </div>

      <div id="method-M000023" class="method-detail">
        <a name="M000023"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000023.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000023.html');return false;">
          <span class="method-name">delete</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Delete the actually bank.
</p>
        </div>
      </div>

      <div id="method-M000024" class="method-detail">
        <a name="M000024"></a>

        <div class="method-heading">
          <span class="method-name">destroy</span><span class="method-args">()</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="MusicBank.html#M000023">delete</a>
</p>
        </div>
      </div>

      <div id="method-M000022" class="method-detail">
        <a name="M000022"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000022.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000022.html');return false;">
          <span class="method-name">each</span><span class="method-args">() {|song, mp3obj| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Iterates along the bank&#8216;s songs, receives a block and call it with 2
arguments, first the String <b><a
href="MusicBank.html#M000018">song</a></b>, and second the *mp3obj*, <a
href="Mp3Info.html">Mp3Info</a> object of that <a
href="MusicBank.html#M000018">song</a>.
</p>
        </div>
      </div>

      <div id="method-M000011" class="method-detail">
        <a name="M000011"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000011.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000011.html');return false;">
          <span class="method-name">find</span><span class="method-args">(opts)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Find songs according to <b>opts</b>, a Hash with the conditions to be
tested at all the songs, generally they are ID3 tags (:artist =&gt;
&quot;Beatles&quot;) or the filename (:filename =&gt; &quot;Rain Falls
Down.mp3&quot;), returns a <a href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object with the songs according to the
<b>finder_options</b> instance variable variable.
</p>
<p>
Examples of use:
</p>
<pre>
  bank.find :artist =&gt; &quot;Beatles&quot;                              #=&gt; Return a new MusicBank object containing the songs with artist Beatles
  bank.find :artist =&gt; &quot;Beatles&quot;, :album =&gt; &quot;Greatest Hits&quot;   #=&gt; The same above but the songs with album &quot;Greatest Hits&quot;
  bank.find :title =&gt; &quot;rain&quot;                                  #=&gt; Contains the songs with the name like &quot;rain&quot;
</pre>
        </div>
      </div>

      <div id="method-M000017" class="method-detail">
        <a name="M000017"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000017.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000017.html');return false;">
          <span class="method-name">get_song</span><span class="method-args">(song_name, mp3obj=false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="MusicBank.html#M000018">song</a> as a String or <a
href="Mp3Info.html">Mp3Info</a> object if *mp3obj* is true, if it&#8216;s
not inside the bank returns nil. The argument <b>song_name</b> can be a
String with the filename, a Number with the <a
href="MusicBank.html#M000018">song</a>&#8216;s index number in @songs
instance variable or a <a href="Mp3Info.html">Mp3Info</a> object.
</p>
        </div>
      </div>

      <div id="method-M000019" class="method-detail">
        <a name="M000019"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000019.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000019.html');return false;">
          <span class="method-name">get_songs</span><span class="method-args">(mp3obj=true)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Get the songs of the bank, if *mp3obj* is true, it return an Array of <a
href="Mp3Info.html">Mp3Info</a> objects instead of an Array with Strings.
</p>
        </div>
      </div>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <span class="method-name">length</span><span class="method-args">()</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="MusicBank.html#M000006">size</a>
</p>
        </div>
      </div>

      <div id="method-M000029" class="method-detail">
        <a name="M000029"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000029.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000029.html');return false;">
          <span class="method-name">method_missing</span><span class="method-args">(method, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
To use a <a href="MusicBank.html#M000015">tag</a> with the prefix
&quot;find_by_&quot; with the method <a
href="MusicBank.html#M000004">find</a>, to multiple tags keep using <a
href="MusicBank.html#M000004">find</a> method.
</p>
<p>
Examples of use
</p>
<pre>
  find_by_artist &quot;Beatles&quot;                              #=&gt; Works
  find :artist =&gt; &quot;Beatles&quot;                             #=&gt; Works, same as above
  find :artist =&gt; &quot;Beatles&quot;, :album =&gt; &quot;Greatest Hits&quot;  #=&gt; Works
  find_by_artist &quot;Beatles&quot;, :album =&gt; &quot;Greatest Hits&quot;   #=&gt; Doesn't work, return all songs with artist like &quot;Beatles&quot;,
                                                        #   but not all have the album like &quot;Greatest Hits&quot;
</pre>
        </div>
      </div>

      <div id="method-M000026" class="method-detail">
        <a name="M000026"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000026.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000026.html');return false;">
          <span class="method-name">move</span><span class="method-args">(dir)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Move the current songs into the <a href="MusicBank.html#M000001">new</a>
directory <b>dir</b>. Create if doesn&#8216;t exist, but if exist just add
the files. Then return a <a href="MusicBank.html#M000001">new</a> <a
href="MusicBank.html">MusicBank</a> object containing the files that have
been moved and the <a href="MusicBank.html#M000001">new</a> location. Note
that if the target directory have more songs inside, the object will
contain just the moved ones.
</p>
        </div>
      </div>

      <div id="method-M000016" class="method-detail">
        <a name="M000016"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000016.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000016.html');return false;">
          <span class="method-name">play</span><span class="method-args">(song=nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Play the file <b><a href="MusicBank.html#M000018">song</a></b> (see <a
href="MusicBank.html#M000017">get_song</a>) if provided and inside the
bank, or all the files saving an m3u file named musicbank.m3u in the songs
directory.
</p>
        </div>
      </div>

      <div id="method-M000028" class="method-detail">
        <a name="M000028"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000028.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000028.html');return false;">
          <span class="method-name">playlist</span><span class="method-args">(format, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create a <a href="MusicBank.html#M000028">playlist</a> according to the
format and returns a <tt>String</tt> with the content. Generally you can
provide a Hash data of options, they are diferent from a format to another.
</p>
<table>
<tr><td valign="top"><b>format</b>:</td><td>A Symbol, the format that the <a href="MusicBank.html#M000028">playlist</a>
will be written, some of them are .wpl, .m3u and .pls

</td></tr>
<tr><td valign="top"><b>args</b>:</td><td>Actually all <a href="MusicBank.html#M000028">playlist</a> builders just
support one Hash with some options. Each one has some different options, by
default to all of them is the :<b>save</b> option that contains the path
the <a href="MusicBank.html#M000028">playlist</a> will be exported.

<ul>
<li>If is provided just a filename without directory (Ex. _list.wpl_) it saves
the <a href="MusicBank.html#M000028">playlist</a> with # relative paths at
the same directory as the songs are stored in.

</li>
<li>If is a complete path it saves in that path and with absolute paths of the
songs&#8217; directories.

</li>
</ul>
</td></tr>
</table>
<p>
Examples of use
</p>
<pre>
  bank.playlist :wpl, :save =&gt; &quot;D:/list.wpl&quot;, :title =&gt; &quot;Robbie&quot;     #=&gt; String with the wpl, stores in &quot;D:&quot;
  bank.playlist :wpl, :save =&gt; &quot;myplaylist.wpl&quot;                      #=&gt; String with the wpl, stores in the songs' directory
  bank.playlist :wpl                                                 #=&gt; String with the wpl, doesn't store
  bank.playlist :wpl, :title =&gt; &quot;My Playlist&quot;                        #=&gt; String with the wpl, doesn't store
</pre>
        </div>
      </div>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000012.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000012.html');return false;">
          <span class="method-name">rename</span><span class="method-args">(format=&quot;(%artist) - (%title)&quot;)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Rename all the songs with a predefined format. <b>format</b> is a String
containing the predefined format, and some words to be replaced with data,
these words are wrapped with &quot;(%&quot;, &quot;)&quot; and are the ID3
Tags.
</p>
<p>
Examples of use:
</p>
<pre>
  bank.rename &quot;(%album) - (%artist) - (%title)&quot; #=&gt; Rename all the songs in the bank, new name example &quot;Greatest Hits - Beatles - Yellow Submarine&quot;
</pre>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000013.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000013.html');return false;">
          <span class="method-name">rename_song</span><span class="method-args">(song, format, deep=1)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Renames <b><a href="MusicBank.html#M000018">song</a></b> (see <a
href="MusicBank.html#M000017">get_song</a>) if exists in the bank with an
predefined <b>format</b> (see <a href="MusicBank.html#M000003">rename</a>
for format details), <b>deep</b> is for recursive use only, internal.
</p>
        </div>
      </div>

      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000006.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000006.html');return false;">
          <span class="method-name">size</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the number (excluding not used songs) of songs in the bank.
</p>
        </div>
      </div>

      <div id="method-M000018" class="method-detail">
        <a name="M000018"></a>

        <div class="method-heading">
          <span class="method-name">song</span><span class="method-args">(song_name, mp3obj=false)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="MusicBank.html#M000017">get_song</a>
</p>
        </div>
      </div>

      <div id="method-M000015" class="method-detail">
        <a name="M000015"></a>

        <div class="method-heading">
          <span class="method-name">tag</span><span class="method-args">(tag, value)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="MusicBank.html#M000014">change_tag</a>
</p>
        </div>
      </div>

      <div id="method-M000020" class="method-detail">
        <a name="M000020"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000020.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000020.html');return false;">
          <span class="method-name">to_s</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Just return a string with the <a href="MusicBank.html#M000018">song</a>
separated with comma and &quot;and&quot; at the end.
</p>
<p>
Example: Some-Song.mp3, Other-One.mp3 and The-Last.mp3
</p>
        </div>
      </div>

      <div id="method-M000021" class="method-detail">
        <a name="M000021"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000021.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000021.html');return false;">
          <span class="method-name">to_xml</span><span class="method-args">(opts={})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns string with formated XML file, with some head information such as
generator, created_at and the number of songs.
</p>
<table>
<tr><td valign="top"><b>opts</b>:</td><td>Hash with some options such as :<b>save</b> (works like <a
href="MusicBank.html#M000028">playlist</a>) and :<b>indent</b>, the number
of spaces to use as identation.

</td></tr>
</table>
        </div>
      </div>

      <div id="method-M000027" class="method-detail">
        <a name="M000027"></a>

        <div class="method-heading">
          <a href="MusicBank.src/M000027.html" target="Code" class="method-signature"
            onclick="popupCode('MusicBank.src/M000027.html');return false;">
          <span class="method-name">zip</span><span class="method-args">(file, replace=true)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Put all the songs inside the bank in a .<a
href="MusicBank.html#M000027">zip</a> file. The <b>file</b> (String)
argument can be the filename, this case will save in the songs&#8217;
directory, or the path plus the filename. If the .<a
href="MusicBank.html#M000027">zip</a> file already exists it just add
content, and if the songs already exists it will do what <b>replace</b>
says, <b>true</b> to replace and <b>false</b> to not replace.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>